Use gdk_window_set_title() afterwards instead.
/**
* GdkWindowAttributesType:
- * @GDK_WA_TITLE: Honor the title field
* @GDK_WA_X: Honor the X coordinate field
* @GDK_WA_Y: Honor the Y coordinate field
* @GDK_WA_TYPE_HINT: Honor the type_hint field
*
* Used to indicate which fields in the #GdkWindowAttr struct should be honored.
- * For example, if you filled in the “title” and “x” fields of #GdkWindowAttr,
- * pass “@GDK_WA_X | @GDK_WA_TITLE” to gdk_window_new(). Fields in
+ * For example, if you filled in the “x” and “y” fields of #GdkWindowAttr,
+ * pass “@GDK_WA_X | @GDK_WA_Y” to gdk_window_new(). Fields in
* #GdkWindowAttr not covered by a bit in this enum are required; for example,
* the @width/@height, @wclass, and @window_type fields are required, they have
* no corresponding flag in #GdkWindowAttributesType.
*/
typedef enum
{
- GDK_WA_TITLE = 1 << 1,
- GDK_WA_X = 1 << 2,
- GDK_WA_Y = 1 << 3,
- GDK_WA_TYPE_HINT = 1 << 4
+ GDK_WA_X = 1 << 1,
+ GDK_WA_Y = 1 << 2,
+ GDK_WA_TYPE_HINT = 1 << 3
} GdkWindowAttributesType;
/* Size restriction enumeration.
/**
* GdkWindowAttr:
- * @title: title of the window (for toplevel windows)
* @event_mask: event mask (see gdk_window_set_events())
* @x: X coordinate relative to parent window (see gdk_window_move())
* @y: Y coordinate relative to parent window (see gdk_window_move())
*/
struct _GdkWindowAttr
{
- gchar *title;
gint event_mask;
gint x, y;
gint width;
impl->display = display;
- if (attributes && attributes_mask & GDK_WA_TITLE)
- impl->title = g_strdup (attributes->title);
- else
- impl->title = g_strdup (get_default_title ());
+ impl->title = g_strdup (get_default_title ());
if (attributes && attributes_mask & GDK_WA_TYPE_HINT)
impl->type_hint = attributes->type_hint;
NSRect content_rect;
NSUInteger style_mask;
int nx, ny;
- const char *title;
/* initWithContentRect will place on the mainScreen by default.
* We want to select the screen to place on ourselves. We need
defer:NO
screen:screen];
- if (attributes_mask & GDK_WA_TITLE)
- title = attributes->title;
- else
- title = get_default_title ();
-
- gdk_window_set_title (window, title);
+ gdk_window_set_title (window, get_default_title ());
[impl->toplevel setOpaque:NO];
[impl->toplevel setBackgroundColor:[NSColor clearColor]];
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
GdkWindowImplWayland *impl;
GdkFrameClock *frame_clock;
- const char *title;
impl = g_object_new (GDK_TYPE_WINDOW_IMPL_WAYLAND, NULL);
window->impl = GDK_WINDOW_IMPL (impl);
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_TEMP:
- if (attributes_mask & GDK_WA_TITLE)
- title = attributes->title;
- else
- title = get_default_title ();
-
- gdk_window_set_title (window, title);
+ gdk_window_set_title (window, get_default_title ());
break;
case GDK_WINDOW_CHILD:
remaining_mask &= ~GDK_WA_Y;
}
- if ((remaining_mask & ~(GDK_WA_TITLE|GDK_WA_TYPE_HINT)) != 0)
+ if ((remaining_mask & ~(GDK_WA_TYPE_HINT)) != 0)
g_warning ("_gdk_window_impl_new: uexpected attribute 0x%X",
- remaining_mask & ~(GDK_WA_TITLE|GDK_WA_TYPE_HINT));
+ remaining_mask & ~(GDK_WA_TYPE_HINT));
hparent = GDK_WINDOW_HWND (real_parent);
y = (window->y + window->parent->abs_y - offset_y) * impl->window_scale;
}
- if (attributes_mask & GDK_WA_TITLE)
- title = attributes->title;
- else
- title = get_default_title ();
+ title = get_default_title ();
if (!title || !*title)
title = "";
XClassHint *class_hint;
unsigned int class;
- const char *title;
int depth;
display_x11 = GDK_X11_DISPLAY (display);
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_TEMP:
- if (attributes_mask & GDK_WA_TITLE)
- title = attributes->title;
- else
- title = get_default_title ();
-
- gdk_window_set_title (window, title);
+ gdk_window_set_title (window, get_default_title ());
class_hint = XAllocClassHint ();
class_hint->res_name = (char *) g_get_prgname ();
attributes.window_type = GDK_WINDOW_SUBSURFACE;
#endif
- attributes.title = priv->title;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes_mask = 0;
attributes.type_hint = priv->type_hint;
attributes_mask |= GDK_WA_TYPE_HINT;
- attributes_mask |= (priv->title ? GDK_WA_TITLE : 0);
gdk_window = gdk_window_new (parent_window, &attributes, attributes_mask);
}
gdk_window_set_transient_for (gdk_window,
_gtk_widget_get_window (GTK_WIDGET (priv->transient_parent)));
+ if (priv->title)
+ gdk_window_set_title (gdk_window, priv->title);
+
if (priv->wm_role)
gdk_window_set_role (gdk_window, priv->wm_role);